﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Library_Code.DAL;

namespace Library_Code.BIZ
{
    public class TONKHO
    {
        TonKhoDAL dal = new TonKhoDAL();
    [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int IdTonKho { get; set; }
        public int IdSanPham { get; set; }
        public DateTime NgayGio { get; set; }
        public int SoLuongBan { get; set; }
        public int SoLuongNhap { get; set; }
        public int SoLuongTon { get; set; }

        public virtual SANPHAM SANPHAM { get; set; }

        //phuong thuc
        public int CapNhatTonKho(TONKHO tonkho)
        {
            return dal.CapNhatTonKho(tonkho);
        }
    }
}
